import request from "../../../../assets/js/request";

/**
 * 搜索用户数据
 * @param searchData
 * @returns {*}
 */
export function searchManagerUser(searchData){
  return request({
    url: '/managerUser/searchManagerUsers',
    method: 'POST',
    data: searchData,
    headers: {
      "Content-Type" : "application/json"
    }
  })
}

/**
 * 重置密码
 * @param ids
 * @returns {*}
 */
export function resetPassword(managerUsers){
  return request({
    url : '/managerUser/resetPassword',
    method : 'post',
    data : managerUsers,
    headers:{
      "Content-Type" : "application/json"
    }
  })
}

/**
 * 修改用户职位
 * @param id
 * @param position
 * @returns {*}
 */
export function changePosition(id,position){
  return request({
    url : '/managerUser/changePosition',
    method: 'GET',
    params: {
      "id" : id,
      "position" : position
    },
    headers:{
      "Content-Type" : "application/json"
    }
  })
}

/**
 * 删除用户信息
 * @param ids
 * @returns {*}
 */
export function deleteManagerUser(ids){
  return request({
    url : '/managerUser/deleteManagerUser',
    method : 'POST',
    data : ids,
    headers:{
      "Content-Type" : "application/json"
    }
  })
}

/**
 * 修改账户状态
 * @param id
 * @param status
 * @returns {*}
 */
export function updateStatus(id,status){
  return request({
    url : '/managerUser/updateStatus',
    method : 'get',
    params: {
      id : id,
      status : status
    },
    headers: {
      "Content-Type" : "application/json"
    }
  })
}
